package com.yanmaohu.yulia.bean;

import com.yanmaohu.yulia.statement.SqlDataStatement;

/**
 * @author Bright Lee
 */
public final class SelectStatementSingleRow implements SqlDataStatement {

    private int beginIndex;
    private int endIndex;
    private SetQuantifier setQuantifier;
    private SelectList selectList;
    private SelectTargetList selectTargetList;
    private TableExpression tableExpression;

    public SelectStatementSingleRow(int beginIndex,
                                    SetQuantifier setQuantifier,
                                    SelectList selectList,
                                    SelectTargetList selectTargetList,
                                    TableExpression tableExpression) {
        this.beginIndex = beginIndex;
        this.endIndex = tableExpression.getEndIndex();
        this.setQuantifier = setQuantifier;
        this.selectList = selectList;
        this.selectTargetList = selectTargetList;
        this.tableExpression = tableExpression;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SetQuantifier getSetQuantifier() {
        return setQuantifier;
    }

    public SelectList getSelectList() {
        return selectList;
    }

    public SelectTargetList getSelectTargetList() {
        return selectTargetList;
    }

    public TableExpression getTableExpression() {
        return tableExpression;
    }

}
